import java.util.Scanner;

public class chapter06 {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        int a = 0;
        int max = 0 ;
        for(int i = 1;i<=10;i++){
            System.out.println("请输入第"+i+"个数");
            int num = input.nextInt();
            if(num>i+1){
               max=num;
            }
            a=a+num;
        }
        System.out.println("十个数的总和为"+a);
        System.out.println("十个数中最大的是"+max);


    }
}
